package com.example.springboot;


import com.example.springboot.datasources.DynamicDataSourceConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import tk.mybatis.spring.annotation.MapperScan;
@Controller
@EnableWebMvc
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
@Import({DynamicDataSourceConfig.class})
@MapperScan(basePackages = "com.example.springboot.modules.*.mapper")
public class Springboot0601Application extends WebMvcConfigurerAdapter implements CommandLineRunner {
	private Logger logger= LoggerFactory.getLogger(Springboot0601Application.class);

	public static void main(String[] args) {
		SpringApplication.run(Springboot0601Application.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		logger.info("服务启动完成！");
	}

	/*@RequestMapping({"/",""})
	public String home(){
		return "login";
	}*/
}
